import request from "../axios.js";
import { baseUrl } from "@/config/env";

// 获取请假列表
export function getCmsLeave(params) {
  return request({
    url: baseUrl + "/cmsLeave/getCmsLeave",
    method: "get",
    params,
  });
}

// 获取请假记录
export function getMeetingUserLeave(params) {
  return request({
    url: baseUrl + "/cmsLeave/getMeetingUserLeave",
    method: "get",
    params,
  });
}

// 添加请假
export function addCmsLeave(data) {
  return request({
    url: baseUrl + "/cmsLeave/addCmsLeave",
    method: "post",
    data,
  });
}

// 通过请假id修改请假
export function updateCmsLeaveById(data) {
  return request({
    url: baseUrl + "/cmsLeave/updateCmsLeaveById",
    method: "put",
    data,
  });
}
